# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


#   500wan比赛信息表
class MatchInfoItem(scrapy.Item):
    fid = scrapy.Field()
    match_status = scrapy.Field()
    contest = scrapy.Field()
    match_time = scrapy.Field()
    match_round = scrapy.Field()
    home_team = scrapy.Field()
    home_team_ranking = scrapy.Field()
    home_team_url = scrapy.Field()
    match_line = scrapy.Field()  # 澳门水位
    away_team = scrapy.Field()
    away_team_ranking = scrapy.Field()
    away_team_url = scrapy.Field()

    odds = scrapy.Field()

    home_team_half_score = scrapy.Field()
    away_team_half_score = scrapy.Field()
    home_team_score = scrapy.Field()
    away_team_score = scrapy.Field()


#   足球比赛游戏信息表（胜负彩，4场进球，6半全场）
class FootballGameItem(scrapy.Item):
    game_no = scrapy.Field()  # 场次名称 周五001
    result = scrapy.Field()     # 游戏结果
    fid = scrapy.Field()  # 比赛id用于关联 500wan 比赛id
    expect = scrapy.Field()  # 游戏期数     竞猜胜负彩 2025-03-28


#   更新比赛游戏信息表（根据游戏期数，更新停止时间）
class UpFootballGameItem(scrapy.Item):
    expect = scrapy.Field()  # 游戏期数
    stop_time = scrapy.Field()  # 停售时间

# 足彩-胜负彩
class ZucaiSfcGameItem(FootballGameItem):
    pass

# 足彩-4场进球
class ZucaiTtgGameItem(FootballGameItem):
    pass

# 足彩-6场半全场
class ZucaiBqcGameItem(FootballGameItem):
    pass

# 足彩-胜负彩-更新
class UpZucaiSfcGameItem(UpFootballGameItem):
    pass

# 足彩-4场进球-更新
class UpZucaiTtgGameItem(UpFootballGameItem):
    pass

# 足彩-6场半全场-更新
class UpZucaiBqcGameItem(UpFootballGameItem):
    pass

#   足球-竞猜游戏信息表
class JingcaiGameItem(scrapy.Item):
    game_no_num = scrapy.Field()  # 场次编号
    game_no = scrapy.Field()  # 场次名称
    result = scrapy.Field()  # 游戏结果
    fid = scrapy.Field()  # 比赛id用于关联
    expect = scrapy.Field()  # 游戏期数
    stop_time = scrapy.Field()


#   足球竞猜-胜平负，让球胜平负游戏信息表
class JingcaiSpfGameItem(JingcaiGameItem):
    rang_qiu = scrapy.Field()
    spf_single = scrapy.Field()
    rspf_single = scrapy.Field()
    spf_bonus = scrapy.Field()
    rspf_bonus = scrapy.Field()


#   足球竞猜-总进球游戏信息表
class JingcaiTtgGameItem(JingcaiGameItem):
    ttg_bonus = scrapy.Field()


#   足球竞猜-半全场游戏信息表
class JingcaiBqcGameItem(JingcaiGameItem):
    bqc_bonus = scrapy.Field()  # 奖金


#   足球竞猜-比分游戏信息表
class JingcaiCrsGameItem(JingcaiGameItem):
    crs_bonus = scrapy.Field()  # 奖金


#  中国竞猜网的比赛
class SportteryMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    businessDate = scrapy.Field()  # 比赛期号
    homeTeamAbbName = scrapy.Field()  # 主队
    homeTeamId = scrapy.Field()  # 主队id
    awayTeamAbbName = scrapy.Field()  # 客队
    awayTeamId = scrapy.Field()  # 客队id
    leagueAbbBackColor = scrapy.Field()  # 比赛类型颜色
    leagueAbbName = scrapy.Field()  # 比赛类型
    matchDate = scrapy.Field()  # 比赛日期
    matchNum = scrapy.Field()  # 比赛编号
    matchNumStr = scrapy.Field()  # 比赛编号名称
    matchStatus = scrapy.Field()  # 比赛状态
    matchTime = scrapy.Field()  # 比赛时间
    sellStatus = scrapy.Field()  # 销售状态

#  中国竞猜网的比赛奖金
class OddsSportteryMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    spf_bonus = scrapy.Field()
    rspf_bonus = scrapy.Field()
    ttg_bonus = scrapy.Field()
    bqc_bonus = scrapy.Field()
    crs_bonus = scrapy.Field()
    spf_single = scrapy.Field()
    rspf_single = scrapy.Field()
    goalLine = scrapy.Field()

    sectionsNo999 = scrapy.Field()
    singleList = scrapy.Field()
    crsList = scrapy.Field()
    hadList = scrapy.Field()
    hafuList = scrapy.Field()
    hhadList = scrapy.Field()
    ttgList = scrapy.Field()

#  中国竞猜网的历史比赛奖金
class HistoryOddsSportteryMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    spf_bonus = scrapy.Field()
    rspf_bonus = scrapy.Field()
    ttg_bonus = scrapy.Field()
    bqc_bonus = scrapy.Field()
    crs_bonus = scrapy.Field()
    spf_single = scrapy.Field()
    rspf_single = scrapy.Field()
    goalLine = scrapy.Field()

    matchResultList = scrapy.Field()
    singleList = scrapy.Field()
    crsList = scrapy.Field()
    hadList = scrapy.Field()
    hafuList = scrapy.Field()
    hhadList = scrapy.Field()
    ttgList = scrapy.Field()
    matchStatus = scrapy.Field()  # 比赛状态
    sellStatus = scrapy.Field()  # 销售状态

#  中国竞猜网的历史比赛开奖信息
class ResultSportteryMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    matchResultList = scrapy.Field()

#  中国竞猜网的历史比赛比分
class HistoryScoreSportteryMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    sectionsNo1 = scrapy.Field()  # 半场
    sectionsNo999 = scrapy.Field()  # 全场


#  中国竞猜网 - 篮球比赛
class SportteryBasketBallMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    businessDate = scrapy.Field()  # 比赛期号
    homeTeamAbbName = scrapy.Field()  # 主队
    homeTeamId = scrapy.Field()  # 主队id
    awayTeamAbbName = scrapy.Field()  # 客队
    awayTeamId = scrapy.Field()  # 客队id
    leagueAbbName = scrapy.Field()  # 比赛类型
    matchDate = scrapy.Field()  # 比赛日期
    matchNumStr = scrapy.Field()  # 比赛编号名称
    matchStatus = scrapy.Field()  # 比赛状态
    matchTime = scrapy.Field()  # 比赛时间
    sellStatus = scrapy.Field()  # 销售状态

#  中国竞猜网 - 篮球比赛奖金
class OddsSportteryBasketBallMatchItem(scrapy.Item):
    matchId = scrapy.Field()  # 竞猜网比赛id
    sf_bonus = scrapy.Field()
    rsf_bonus = scrapy.Field()
    dx_bonus = scrapy.Field()
    wnm_bonus = scrapy.Field()
    single = scrapy.Field()
    dxLine = scrapy.Field()
    goalLine = scrapy.Field()
    matchNum = scrapy.Field()  # 比赛编号
